package com.jic.order.controller.feign;

import com.jic.common.base.vo.RestResult;
import com.jic.order.api.MemberApi;
import com.jic.order.response.FrontOrderStatusCountInfo;
import com.jic.order.service.OrderQueryService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = {"Feign-会员接口"})
@RequestMapping(value = "/feign/member")
@RestController
public class MemberFeign implements MemberApi {

	@Autowired
	private OrderQueryService orderQueryService;

	@ApiOperation(value = "查看我的订单状态数")
	@PostMapping(value = "queryMyOrderStatusCount")
	public RestResult<FrontOrderStatusCountInfo> queryMyOrderStatusCount(@RequestParam(value = "buyerId") Long buyerId) {
		return orderQueryService.queryMyOrderStatusCount(buyerId);
	}
}
